import request from '@/utils/request'

// 查询采购申请单主列表
export function listPmsPurchaseRequisitions(query) {
  return request({
    url: '/system/pmsPurchaseRequisitions/list',
    method: 'get',
    params: query
  })
}

// 查询采购申请单主详细
export function getPmsPurchaseRequisitions(prId) {
  return request({
    url: '/system/pmsPurchaseRequisitions/' + prId,
    method: 'get'
  })
}

// 新增采购申请单主
export function addPmsPurchaseRequisitions(data) {
  return request({
    url: '/system/pmsPurchaseRequisitions',
    method: 'post',
    data: data
  })
}

// 修改采购申请单主
export function updatePmsPurchaseRequisitions(data) {
  return request({
    url: '/system/pmsPurchaseRequisitions',
    method: 'put',
    data: data
  })
}

// 删除采购申请单主
export function delPmsPurchaseRequisitions(prId) {
  return request({
    url: '/system/pmsPurchaseRequisitions/' + prId,
    method: 'delete'
  })
}


//获取采购申请单编号、申请人信息和申请部门信息
export function getPurchaseRequisitionsData(){
  return request(({
    url: '/system/pmsPurchaseRequisitions/getPurchaseRequisitionsData',
    method: 'get'
  }))
}
